Use query for token completion

We should use a query for token completion instead of just loading all possible forms of tokens into memory at init (i.e. this is the branch which will help alleviate the crazy long startup time).