Small formatting fix.
Move TaskStates.
More removal of dead code from old Task Class API.