Improved mod_detection, can toggle detection on and off