Moved some templates out of headers.