Also use the more appropriate lock_guard for mutex usage. And I noticed that in the NotificationCenter we assumed a callback would be able to unregister itself, which requires a recursive mutex. As such the mutex has now been elevated to be such.