I changed up some of the queries to the database to reflect the names of the tables and values. I can not be for certain that they will work as intended, but there is a higher probability that they will.