Database addition; refactoring.