Added functionality to pop items.
Fully working for part 2.