Clenaing up the js code, JsLint you're a nice buddy.