Add support for RelayState.

@jefff This is an unrelated change right? Lets put it in a separate PR for clarity.