making controller work with ProcessorContext. Unfinished. Added some logging.