On the economics of the legal systems and courts