Client library cleanup

Just some low hanging cleanup while looking at the code to understand what it tries to do...