Improve style and comments