Implemented global variables scope