Various minor changes
started refactoring the client tests... Work in progress