DeTool.py: various improvements