Added class inheritance for HMMs and discriminative classifiers.