removes uneccasary images