adding travis-ci support, refactored a bunch of code to pass rubocop