Add support for registering global values
Add tests