Updates to numerous templates, and pep8 cleanups.