mned: removed TEditor.done, cleaned up code.