Code cleanup and enhancements of Cell TextEditor