TokenStream previous method and minor changes