Minor changes to run(), adding a readFile() function to clean up code a little