refactoring - moved code from cli to api
added '.travis.yml'
refactoring