lots of minor edits
made a fileDelete function