Sorts the Affected APIs properly