Fixes potential memory leak issue, fixes mob holding item when a dead
body, removes useless code