Worked a bit more on the workflow system.

It's a lot cleaner now, just need to get tests finished and manager in
place. Will probably move this along with the plugin system before too
long to CUL.