Sorry about the confusion with ReloadUI. I had thought Petship used ReloadUI but I was wrong. (Answered your question shortly after a reformat of Windows.)
My overall solution is to load everything after all variables are loaded. Doing so means none of it is relevant and only six lines of code are ever loaded or used. If you need an example of how I do it you can take a look at
Petship.
Otherwise Ammako's solution will work as well.