Updated on_key_change event
More minor updates