Small tweaks, and updated test for better coverage.