Updating some of the file creation stuff

rewriting how some of the file creation functions work.