replaced _ with spaces before inserting in db
refactored queries to work with the new, slimmed-down database