Move some misc functions into two new utility classes, Vector and Statistics, and update standard methods in ValleyObjective.
Fix a class name in an exception.