refactoring: detector and types now outside (in run)

аналогично потерялся override