Kotlin rewrite of Java to Kotlin converter