Move repeated code to removeAllChildren

What the title says.

- [x] Test plan: `grunt test`