Massive Changes

* Moved files to library
* Added executable
* Added Travis CI support
* Added Gemfile
* Added gem specification
* Simplified code