Modify getAllItems to return copy of list instead of pointer