Made number of open pages a parameter for sparse and dense matrices.