Clean up def template