Edited syntax, code, and comments/notes/TODOs

Made code more readable and consistent, added comments so I don't forget
what I was thinking about tomorrow when I do this.