clean up old code, WIP implement processing