Implement better insert

Before:
```
$ ./expand2
Expanding: ((y + x + z + w)^15 + w)*(y + x + z + w)^15
1176ms
number of terms: 6272
```
After:
```
$ ./expand2
Expanding: ((y + x + z + w)^15 + w)*(y + x + z + w)^15
1159ms
number of terms: 6272
```
So things might have got a tiny bit faster.