adjust whitespace and add some comments