update images and delete extra markup