Minor tweaks and corresponding tests.