Improved interop code