Added comments after code review.