Fix typos. Adding some comments and removing some old commented code.