Further work on forcedetect.py