more fixes based on PR comments
All PR comments dealt with.