Decided addElement code was dumb and deleted it
Tried a slightly more sensical approach to addElement