function-ized the code so that it's easier to read/change. The new script runs all files in the folder provided (even the ones you don't expect at times...)