minor cleanup/fixes for lmod PR + sync with develop

This is for @dmlb2000, and maybe also @pforai.

The commit to focus on is 05da920, all the rest are sync commits.