Template formating clean-up