cleanup dorothy-state logic