Refactored most of the html to new templates.