Started coding a workflow class for encapsulating pmonitor etc.