Edited buildList

- I believe it should've been insert(toInsert); as insert takes a
pointer parameter
- toInsert should be initialized to NULL
- toInsert should be deleted after the while loop or there will be
memory leaks