Added discarding of items
Refactored and tried to fix tests. Still one to fix