more refactoring for QuadtreeMatrix