Commands and keybindings refactoring