Remove querySelector from update function