Name variable "node" rather than "widget" since children can be plain DOM nodes too.
Also simplify code in removeChild().