Added removeLastItem() function