Fixes and cleanup based upon code review.