relay: rewrite event/call system to make it much cleaner