Money is present in most economic activity. For individuals its amount is the major constraint on their actions. On national level monetary policy is an important and disputed topic. Regardless of its prevalence money has not been satisfactorily integrated into economic theory. Only recently there have been attempts to provide rigorous theoretical foundations for money. My objective is to continue this development in monetary theory. The existing theories illuminate one particular feature of money. However, there is no coherent theory that integrates all its main functions. Further, the relation of money and credit remains unclear. This connection is of major importance for monetary policy. Another objective of this research is the theory of banks, and banking competition. The field is reminiscent of the theory of money; there are several theories that depict one aspect of banking, but a theory that integrates all the important features is missing.