Clean up template view.