Bunch of client configuration work and tests.