Converted a part of sample app to Kotlin.
Rewrote some more sample codes with Kotlin.