Quickly hacked to use a buffer rather than a processor.