clean up templates a bit