Refactoring the DetourCrowd AS sample for clarity.