Updated for JS SDK 0.9.0