Rename config --> factory

Fix small error in refactoring