Add tests and improve stringification of classes (now including 'extends(...)').