Xcode 6 Beta 7 changes adapted

Fixed bugs with optionals to work again in Beta 7
Merge pull request #3 from elsesiy/master

Xcode 6 Beta 7 changes adapted