Rewrite exponential in terms of abstract classes

The exponential should be rewritten in terms of abstract classes.