Optimize.py: optimization wrapper so manual optimizations of the form _len = len don't need to be done.
Cleanup bolt.Path.py, use Optimize.py rather than nasty method used before.