More cleanup to raw code based on ActorProducer/ActorConsumer.