CQM-148 Code review/shellcheck fixes