Optimize class 'FactoryUtils', and extract configurable properties from
codes.