Making a mess with StringIO/BytesIO, cleaned up remaining ImportErrors