Rubocop code improvements