cleanup of afix and dsr.py