made option to change data attribute; remove extra whitespace from DOM when removing elements