Fixed remaining edits, removed scratchpad headings, and added a section on writing to a text file