restructured
ui dependency factored out
subscribing to events