Added entitiy cleanup