Adding some javascript niceness
Forgot some of the javascript niceness