minor formatting and update some comments