cleaned up a template