Added variable substitutions. Binding outputs will now expand variables inside terms into their instantiations.
Added support for variable scoping. This required altering the Variable datatype to store an integer identifying its scope.