Factory

Here comes the content of the factory pattern