Improved the grid layout when things are different sizes.