Refactor classical inheritance code into utils.inherit using adapters.