simplified RepeaterNode
Added a TokenStream class
finally nailed the double curly brace issue, and the code is fast enough for now
simplified the TokenStream class