Refactor ActivatorFactory