style refactoring

This is a refactoring to address a majority of items detected by running [RuboCop](https://github.com/bbatsov/rubocop) on the project.  This does not address everything, but covers the majority and hopefully brings the code closer to the [Ruby Style Guide](https://github.com/bbatsov/ruby-style-guide), which may help the code clarity for new contributors.