Refactor.
Move the database stuff within the DB namespace.