Javascript Loop to remove html elements. (NOT WORKING)