Update Javascript objects