Added TokenList, some basic refactorings