Converted to newer .ruby-version and .ruby-gemset files (from .rvmrc) so that it works with other package managers as well.
Adding rubocop settings file.
Fixing errors based on rubocop rules. Configuration file also checked in. To run, 'rubocop -D --auto-correct'