Multiple improvements for Swift