Client type detection in a separate class