Change display from using side effects to directly modifying the result box.