Update Client.java

Cleaned up and added comments to the existing code