Polish the code based on the comments from code review