pull config from 3.x and namespace-ify (refactored a bit to reduce complexity)
add Arr class from 3.3
patch Arr class to use static:: for calls to local static methods