Small refactoring of Grid helpers