Version 1 of code. Compiles, currently working on 'addElement' function
Almost working - not printing correctly? Or terminating early?