Refactored to use universal PipeObjectReader and PipeObjectWriter.