Created a protected method createMode()
Fixed a bug in DenseModel#entries() and supported auto expansion of
internal arrays