Some minor cleanup of the javascript.