Fixed indentation in client.java
Added shutdown handling in client. Reformatted try catch statements and modified behaviours for messages oriented exceptions.