Removed useless "using" + big refactoring
Improved factory implementation to reduce the number of parameters