XCode6 final fixes

Fixed all warnings and errors of the code.
Now it runs fine :).