Improve comments, code cleanup