Refactor visitor recognition in his own class, so that a third party plugin could reuse it.