Refactoring.

New method searchTokenType that gives the token to all the regex etc.