Moved some classes to a separate file
Use the mean distance and standard deviation instead of the shortest distance