Add support for enum types and improve stringification of classes slightly.