Minor cleanup and adding comments.