Added more token reader scenarios and fixed bugs.