getData global syntax fix

fixed syntax error using global, and removed old commented out scripts