Cleanup based on woolie's code review.