Handled more semantic errors related to inheritance and class definitions.
Added more test cases.