minor db class refactoring