Added ability to access global variables from lua scripts