DB class refactoring.