Updated to work with xcode6 final