Moved templates into headers (where they belong).