Fixed mishandling of an items list with no items, cleaned up tests