template overhaul

small template error fixing

continued error fixing

basic template overhaul finished