Added event handling for start and stop