Added more documentation in apis/template.js