Refactored into new ClientUtil