Swift corrections

See commits for a summary. Updated the project and fixed latest changes in Swift behavior