r21058: Finish the easy refactoring - split out all the case