Moving token implementation out of header file