Refactor medDiffusionWorkspace.