Updated javascript init