Check out the code, it is pretty well documented.
svn: svn.addictedtonew.com/libs/addicted-to-magnolia/trunk/