Please read chapters 1 and 2 of Thomas VanDrunen's book at http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.115.9659&rep=rep1&type=pdf. The relevant material starts at pdf page 15.