Refactor db interface.