Moved queries to own file