Restructured linked list for data to be on heap.

List data is now stored on the heap; deleteList updated accordingly.
Fixed malloc casting and list copying
Fixed addToList bug for list data.

Calling addToList to add list data only works if the list already
has all of its elements initialized, since a copy of the list is
being made.
Merge pull request #1 from mvankeulen94/testbranch

Testbranch