major refactoring of DbManagers