Create swag.kt, a Kotlin implementation

This should close issue #17