First pass at extracting grid widget from the form widget. This commit has a lot of duplicate code - future commits will reduce and reuse the duplicate code.