main now loops until recieving a signal and then returns EventHandler() before exiting.