Looks fine to me.
Perhaps set the deactive call in a trap, so you're sure it gets run?
rebased
1 new commit added
You want to add this right after the activate call :)
Looks sane to me.
Thanks :)
Pull-Request has been merged by pingou