changed sum/prod to reduce to maintain ordering, switched to SparseMatrixCSC implementation for DiracVector and DiracMatrix