Cleaned up global.R