Finished up script, made some cosmetic changes to the files