Misc fixes

Resolves issue with incorrect profile after load.
Fixes ResetDB and cleans up RegisterNamespace