add requirements for mako
Refactor the file parser into its own function
Reindent everything to make it pep8 compliant