add more comments to the code for report submission, remove some dead code