Refactoring in minify.py