0.5.3: Replace each() with detect() and adjust loops.