Tidied up testing and mindist classes, checked that they work and removed unnecessary comments