When I copied this over it looked like a good refactor, but I can revert it for this pull since it's unrelated to the actual sizing of the panels.