[zdf] Make width extraction more robust
Remove unused imports