Add pkg/template. Move standalone packages to /pkg.