Fixed bugs in the composite matrix routine. Made a dubious change of putting the graph attribute in matrix instead of sparse_matrix, but doesn't every matrix have a graph in some way or other?