refactored tests and added jasmine-jquery and karma for test automation