fix errors reported by jshint
add missing default
move template parsing to init …

… while running jasmine tests, the templates are not yet loaded when the object is being evaluated
remove unused variable
simplify a line of code
additional tests