Create diversity.rb and some fixes for errors discovered by rubocop

Allow loading of the entire library by requiring a single file.

(This file might have to be added to the gemspec as well.)