Use of class variables instead of globals