Modifications according to code review.