Reordered methods so that all public methods come first, then all protected methods then all private methods.

Also some minor whitespace diffs.
Refactored Provider::make to be a bit easier to understand.
Refactored Provider::share to be a bit easier to understand.
Removed a bunch of ltrim and strtolower duplication; renamed variables to match.
Found another place to reuse Provider::resolveAliasIfNeeded.
Fix issue #60