Rip out all the event loop stuff; use Roland's suggestion