Move repeated code to removeAllChildren