Removed all reliance on 'global'.