Added some comments to each function in the client.