Updated code according to code review feedback.