clean up, fix templates