Updated to Work with newest version of Xcode/swift