Rubocop + foodcritic checks

Added Rubocop and Foodcritic to the test suite. Updated the code to be green again.