Rubocop refactoring + added license to gemspec

This is actually a branch on the changes in #89, so should not be merged until that one is. But I though that I would create this so that they could be merged one after another.

There are no functional changes, aside for adding the license to the gemspec.
This gets rubocop down to a small list of code complexity and line lengths complaints, which is totally manageable.