Finish variable functionality. Really need to clean this up and make use of the better error reporting that was introduced.