Cleaning up template definitions.