TokenStream class now derives from object