Proper struct definition
Old memory needs to be free'd when changing the capacity
Added getter and setter functions
Added missing line break
Free resources on error, made List_free error prone