Perhaps the headers could be extracted to methods

```ruby
    # Check that the contact_headers are all valid (case insensitive)
    def validate_headers
      raise UnknownDataField, unknown_headers.join(',') if unknown_headers.present?
    end

    def unknown_headers
      contact_headers.reject do |header|
        valid_headers.map(&:downcase).include?(header.downcase)
      end
    end

    def valid_headers
      %w(id email optInType emailType) + account.data_fields.map(&:name)
    end
```