cleaning up the client and starting to add asserts