Bug in the add provider to the adapter fixed.

Refactored the new provider dialog too.