Cleanup - changing names of files, adding the detector switch