Refactored grid.