Re-wrote pub/sub system