Fix code to pass all tests. Close #5

- Fix code to pass all tests. 
- Refine dependencies.
- Add settings for Travis-CI.
Close #5