delete all img from html and simplifying the js