Move COM interop stuff to its own file