Updating the matrix generation script a lot.