Cosmetics for Issue #15 (and some unrelated optimizations)