Added diagnostic output.
Re-factored it to work with the new Processor library.