Improved const correctness for module API.
Factored out "current_vterm" variable. Replaced with "CURRENT_TERMINAL" environment var.
Swtich terminal when terminal is closed.
Changed name of current terminal environment variable.