relay: multiple updates

* refactor code to make vars clearer
* parcel and unparcel id of builder
* fix NPE when server was disconnected without full connection