Factories optimization