Finish revert and correct Xcode warnings