Restructuring files
Simplify DetectFromPath