Refactors keybindings
Resets styles and improves key handler logic.