refactor db_helper using faster sql query (untested)
drop cruft tables in database