Introduce a new function and use it everywhere, including automatic curve deletion checks to guarantee consistency.