Use vector instead of unique_ptr + length