Updated javascript structure.