Finished testing script. A little housekeeping too.