Rewrite with classes.