The core editor logic for Graceful. Designed to be modular, and usable in other contexts.