Added key bindings and better behavior for editing