Minor improvements in style, add comments.