Refactors publish_event() and publish_event_object() of UNS

* According to Michael and Maurice's comments in email thread