This patch proposes behavioral changes. In particular, referring systems will need to provide client ids under all circumstances.
Whenever it makes the code easier to follow, use early return to avoid else statements.