Minor cleanup of getClient logic, essentially the same