add examples/var tree
fix similation flags and code
export EXAMPLES_BASE so samples can have a non-system work area