add some comments and minor cleanup