Refactor the Client constructor