added proper tests to Detector and fixed up the extensions bug