Rewrite crawler and change database structure