Changed Queue structure + replaced db_query