I\'ve been working on this script and I\'ve recently been trying to get it cleaner by putting everything in there own function. The code below runs without errors, gets the data