client is all working now, add unit tests.