Added javascript data loading code