Removes unneeded images