Add code to support inheritance in script