Integrated prehash into db.sql, updated db.sql with latest stuff