Controlling subclassing of classes