code cleanup and organize
prevent some "template not in DOM" errors
bump version