Code style refactoring to please Rubocop

Fixed most Rubocop 0.28.0 offenses.