refactored workflowmanager classes