Better inheritance implementation