refactor and adapted tests to new layout, deleted class ComponentFactory (not needed anymore)