FLUID-4826: Code clean-up as well as adding comments according to feedbacks from the code review.