Inject a factory to customize component creation

There are lot of static methods in this library
Thank's to use less statics and inject service. It's better to evolve and customize.
Open Close principe of SOLID.
It's my first pull request to improve this problem