Small refactor from rubocop suggestions