Proper use of globals