Updated to support Swift 1.0