Moved keybindings into its own function