Changed the way token stream is created