Added support for class inheritance