Updated code to conform to changes in the Swift language introduced with Xcode 6 beta 5.