Redesigned server to loop; made client less crash-prone; design changes