Update globals
Add tests