Added cofactor() and determinant() functionality