Event loop (a sketch).