Rewritten and much better Java backend + All tests pass again