Add dim variable in loadSquareGeometry, because fewer magic numbers is a good thing