bit more tidy up on templates