fixed tests for karma and specs.html to use the templates.js from the .tmp folder. refactored tests to not need  now that we use templates