The initial implementation of the code stored squares in the grid in a
"pretty" form. This is a complicated bit of code and slowed down the
code slightly.
Now we just store the size of the current square in the grid. This
reduces the code complexity, and offers a slight performance
improvement.
We still output a prettified version of the grid, as we can generate
that from a grid populated with just square sizes.