Change Baisen implementation to Swift.