doc'd all the javascript