clean up templates using base