Made some changes with inheritance