I think we're duplicating this a few times - what do you think about moving it up into the XeroGateway module?