- Add support for multiple plugins trying to modify the same reference
- Fix a small signed/unsigned warning
- Minor code cleanup