remove unnecessary file and refine the image