Minor iprovements and fixes in the client side code