RF: many minor tweaks

- often inspired by pylint messages