Changed to global vars for state so that we can reduce code and HTTP GET status to server...