Added jasmine to project

- Added unit tests
- Moved some code out of impactjs to be testable