Finally got optimize.py to run properly. Actually outputting reasonable values