NOJIRA: various small fixes and enhancements to recent code, including PAHMA-960 and PAHMA-959