Update JavaScript Functions