Modifying exponent class to not use instance variables