renamed variable "h" to "varInfo"

It caused "h" in "visit()" to be non-local.
optimised imports
eliminated unnecessary calls to Array::reverse()
compiler uses a custom exception class