Deleting extraneous elements in the HTML