onUnitShape added, more generation work