scalpel jni with major memory leak fixes in scalpel code (some minor ones remain)