Updated the Swift code for Beta 5