finish refactoring of initializeNativeTarget