Refactored grid