Polish Document.Selection API.
Cleanup Editor.