speed up generation of an intermediate CSV file
import only modules, and don't directly import classes and functions
remove an unused function
default to python2 again
delete excessive empty lines.