Cleaned up the Server and Client code a bit.