Refactor Job and Workflow classes.