refactored templates, code cleanup
build new version