Factory added
To use the API and make it more testable some factory is used. This is the first approach to implement this pattern.