Even though its just a test script, lets clean up the code