Minor client refactoring