Numerous fixes from review.