Changed implementation of tokens to use the ast rather than lexer