Final version of DenseMatrix and TwoDArray