rename funcFlag and argFlag
remove unused variable
add token buffer flush function
performance improvement