[FOLD] Refactored visitAll