extrema.py working, but vector scaling is strange.