templates has been moved to separate files

code clean-up has been done