Handle the case where we don't find any matching queries. Use the last one
Handle blank queries and leading and trailing commas
Uglify