Fixes with DB functionality and namespaces update