Reworked all queries to current database columns