move xhr stuff out @coryvirok