Poorly written simple client / server code