Fix some bugs and add _Tokens class (provisional, will removed)