Updated javascript client