Used Size objects instead of Rectangle to represent sizes in Grid.