initial pass
this seems to get the tests running
switch to mutable matrix, much easier :-)
switch to proper single-linkage clustering
Clean up some comments