You can improve it a tad further by using:
Code:
unset %tabm %tabn
Or to remove all of the variables starting with %tab:
Code:
unset %tab*
Your overall snippet can be shortened even more, but good job on that nevertheless.