BaseEntity cleanup