Simplify isoRectangle code