key bindings and cleanup