cleaning up the template edit view