More porting to Swift.