minor code layout and comments