Fix rubocop and foodcritic warnings