Updates to detector.py. Some temporary stuff.