ElementFactory refactoring