Update some js functions