pep8 cleaning
fixed imports
added templates