Improve code according to review.