refactor token dependence

template need to define every method in header
so change it to normal type, with comment/precompile