Edit JSON fuctions and add global class