Mostly adding lots of comments

Documentation and all that jazz.