Minor refactoring in Workflow