Refined configure.py