Simplified the diagnostics framework by following the observer pattern more closely.