Improve comments and minor cleanup