template and html cleanup