Cleaned up performQuery
more performQuery cleanup