Refactored unit tests and Jasmine spec runner