refactoring of factory provider kwargs api

Done.