Remove dropped entities, move code to inventory