removing extraneous images