Script for tokenizing queries correctly.