Provider improvements

contains also various cleanups