some changes.

change class structure.
add travis.
add documentation.
add small test.