Some improvements to the generator based on Magento findings.