Fix flake8 complaints.
Stop encoding and stripping enumerated XML.

I have a feeling this will result in unicode errors popping up
elsewhere, but stripping this data is resulting in inconsistent query
results.