Minor modifications to the internal variable named used in factories (changed to "factory").