first decomosition
I thinsk its all working now
I think this now works
first refactor stage
unified driver output
centralised event handling
centralise queryby