update version to 1.2.2
Add travis script
Cleanup code