Modified gatherMatrices(). Now the third parameter is only pointer instead of pointer to pointer.
Modified decreaseMatrices(). Now the third parameter is only pointer instead of pointer to pointer.