Clean up and simplify keybindings and mode hooks