Refactor key bindings