Refactoring of detection experiment.