Working on organization of client and server loops.