Update code as per @wvu's code review.