Move grid logic into it's own section.