Fixed to access the children of the Pane's container.
Changed add() and remove() methods to appendChild() and removeChild() to be consistent with original source code.