cleaning up mess of template html and css