Initialize javascript structure