Error checking when deallocating memory.
Fixed BaseObject TryKill and ClearDistToRoot.
Renamed RemoveStackFrom.