Class inheritance in node