correcting typos, problems, and various bugs