Remove unused dom elements