Refactor to namespaces.
Backport refactor from 2.0
Merge branch 'settings_ns' into 1.3