dfm.py: cleaner code