Removing unecessary images