XCode6 final fixes

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