Changed things to comply more with what JsLint considers quality code (but then I realized I didn't really want to do it in the end)