DB package refactoring