Minor non-functional tidying code movements.
Avoid NRE case where no delegates registered for a key event.
Key bindings can now be reassigned.