Fix missing () after new, add missing semicolons, cache xhr.status var a...

...nd treat as integer w triple equal