added getType() and getChildren() functions.
Added support for saving exec() results as variables and retrieving
variables with getVar().