Modern syntax + fix casts
cast
xcode format fixes
fix all xcode warnings