Update.

- Add Jasmine and Phantomjs based unit test
- Created API documentation