Rewrote FeatureVector to be shorter and easier to use and added a test as well. Optimized main method as well.