Made the Client main loop work.