Moved queries to lowtone/db.
Updated conditions.