pep-8-ify

I just changed a few function names to be a bit more consistent. Other than that looks good. Template.py is much improved.