Updated code before review.