Rofl. You will not believe how easy it will be to save your variables. If you have ever used tables you're half way there. Take a quick gander at that page I linked when you're head is more level rofl and you will see what I mean.
Basically your code as it is will work fine. You just need to store the value in your saved variable table and restore it when your addon starts
2 or 3 extra lines and you'll be set