Improve comments and style