refactor codec check codes
add back jni headers
remove unused import