Refactor Grid, add parent/child relationships.

Refacoring sucks, I should have done this earlier...