Worked hard on client.
Added tests for client.