ENG-1218: add some comments and minor changes.