organize and comment ParallelConsumer, add unit tests