Simplified the remove_pics() routine