Clean up template formatting.