Refactored Provider::share to be a bit easier to understand.