Added support for inheritance.