clean up html and remove old templates