Globals

Add support for globals.

To-do: doc