Changed around the graph product routine because part of it was incorrect, starting offloading some of the testing in matrix_tests_5 to a contained subroutine