Exactly what I was looking for :)
Much cleaner now, thanks to the pubsub mechanism