Refactoring Java client implementation details.