Restructured addTokens() to read parameters from JSON file