Switch to smallvector. Also fix issue with using unsigend for MaxSplit.