improvements: XsSharing middleware, api