Added jasmine and refactored using objects