Added support for Kotlin and improved testing