cleaned/refactored Main code
optimized JNI calls to OpenCV in bgs method, adjusted some parameters in
Main code