Major refactor, mainly java migration fixes implementation + performance improvements.