Improvements to the Java engines

Stability and performance improvements.