Some Swift improvements