created new template system

Updated to use the Mako template engine in python.