Fix some stuff and implement new events.