Convert global vars to class accessor methods