(D3D9) Some cleanups