Refactoring work: fixing notification queue handling to be more robust.
Refactoring: partial cleanup.
Retain debugging in bridge for safety checks.