Fixed errors in some implementation of distance functions. Made some changes to the main function that handles the code to verify the cluster assignments. Also made changes to the visualisation code.