XHR and style cleanup