Added BaseEntity class.