cleaned up client. Added comments to server