added more native code and cleaned up sections