Refactor. Stop using memory for list copies.