template cleanup and fixed broken links