Add a lot of comments and some other misc bits.