Refactor SQL message bus
- Use events to flow changes instead of passing delegates everywhere
SQL message bus changes:
- Suppress warning
- Move declaration to tighter scope
- Put ++ on its own line in the test