Add slightly more complicated event loop.