Change API to set children in the Element class