Refactor OperatorFactory