Update to apply pchote's suggestions.