Cleaning up templating