Altering getters and setters to avoid global variable redundancy