Updated mainloop and birthAndDeath