Clean up the code in addToken