fixed removing items. There are still some errors but overall it works