Improve preprocessor.py