Fix completion problems.

Previous commit "New: Protect against client server errors." had broken server functions returning values.
Use Java instead of Kotlin.