rubocop code changes (kind_of -> is_a and more)