Small code improvements based on code review.