Fixes issues raised in code review.