Add optimizer.py -- previous commit had forgotten to git add it.