Add some comments, fix minor issue.