Xcode 6 Beta 7 changes adapted

Fixed bugs with optionals to work again in Beta 7