Fixed freeList() to account for empty list, added check for empty list in addAtRear()