Jasmine

Added in the jasmine testing suite and one test.
Refactored the application js file to be more testable