Add better support for classes.