Cleaning up templates a bit