Small improvements in python scripts.