Reimplement original functionality as a class.