fixed issues with enviroment declarations
Added transVar functionality.  Needs testing