Revert "Move native code to library"