Cleanup and simplification.

Fix things found in review.