Swapping events to signals
Events and code cleanup