Implement Type-2, Type-3
Fixed indexing bug causing straight implementation of Type-2 to fail
Converted for-loop indexing to conform to distance matrix enteries