Changed max distance constant.
Removed unused functions.
Switched to using linear interpolation instead of logistic distance.