Refactor and clean-up
Refactor: add NodeInfo.id and update callers
Space
Improve flat view duplicate fixup

- always count from 1
- remove object/var