Added support for global variables

Fixes #46
Ah, may be sequence is important - ignore.