improvements to niri_redux.py