Add custom keybindings
Misc refactoring