Added another refactor iteration to the db_pull code.