Some refactoring in my patch on document
command source fidelity. // rdar://13066276