Minor cleanup for `add_bind_root`

- Change some lines that are too long
- Introduces intermediate variables to improve legibility and document intent
- Modify a var in appropriate scope so that we don't need the `_root` scope hack

Sorry for not doing this in review of that PR. I had too much stuff going on at the time :)