xs: tidy up, reindent, remove some unreachable bits

Signed-off-by: David Scott <dave.scott@citrix.com>