My current plan is something like your first suggestion (I think... assuming I can get it to work right) I'm updating nDuration at the start of each Segment but if the Effect is due to expire on that Segment, I'm actually expiring the Effect just before the appropriate DEX. There are some issues I can see that I still need to work out... but I'm trying to get them sorted.. this bit has got my head spinning a bit. :D