Improve comments and readability