Fixed initialize and partially implemented addElement
Made addElement (maybe?) work when there's room in the array