fixing image paths and deleting excess content.