Merge pull request #10 from dlazell/buildorder

changed getClosestState to the original
Fixed getClosestState() by adding 1 and changing sorting order.
Using probability distribution for prediction instead of just sampling/max.
Removed deprecated distribution method
newest upstream