Converted global variables to not be part of a struct