Example lbbroker: restructuring of main loop.