Update code and project to work with Xcode6-Beta5