Refactor to fix Rubocop offenses
Merge pull request #2069 from orendon/fix-rubocop-offenses

Refactor to fix Rubocop offenses
Lower coverage threshold to 91.65 percent for mongoid