Extracted Grid Layout Code to 'grid.php'