Corrected class inheritance structure.