Split reader and rewinding_reader out into a separate file.