Added a class TextParser to parse lines of text for anywhere tokens.

Bug with the token parser which adds duplicate tokens somehow. Should be fixed by next commit.