Java to Kotlin convertor: more code improvements