Replaced signals and slots to events.