Refactored dbaccess module.