clean up some code for report ui.