New workflow class and added lots of debugging.