Update client code and some formatting changes