Updated to use version 3.3 of the JavaScript API