Remove logic from command factories.