Removeing unnecessary images