Minor Database refactoring.