Add a Factory to let the developer define how components are instantiated