Fix bugs created with last commit; improve comments.