karma updates, testing, start of directives refactoring

* Karma tests currently breaking due to the templateUrl references not able to be pre-processed.