Minor bugfixes and a bunch of comments.