content repository almoust ready

what if you add return type to detectClient method?
then `if`s  could be placed to this method.

kinda anticode dublication