Touched up the XMLHttpRequest code (fixed some bugs, fixed formatting, etc.).