Finished the template.js methods and templateTests.js