Reorganized JNI
deleted stuff
Completed implementation of EM