production code has been converted to Kotlin, but not all of it is really using the Kotlin idioms - don't hesitate to improve. Also, we would need to convert all tests into Kotlin