Continued refactoring

Further refactoring
Added .travis.yml