Added Entity class with inheritance.