Style changes, improvements according to egyp7's comments
Style changes according to sane rubocop messages