Fleshed out exposed variable system for Lua scripts.
Exposed variables in lua now load/save properly.