Expanded the use of templates and made some change to the layout common css.
Formatted code in html/js files, created and used more templates.