Added content to Loans page

+ Added content to loans page and full functionality
+ Added helpful methods to functions.php
+ Template improvements
* Moved .sql files to sql/ directory