Refacto init provider

If you are fine with that, i can update README before merge.