Updated to use 3.3 of JS API