relay: some more cleanups