Refactor Editor a bit, and add an execCommand method.