Optimizing the controls for adding/removing lines