Refactoring in DynamicGrid