Kotlin initial version including cosmetic changes by bashor