Complete refactoring of EditSession methods
Refactor out duplicate code for refactorings which edit a single file