a little cleanup and a few comments