Grid: Refactor a little bit