looks like all `var` declarations besides `children` are unnecessary (since they are only used once)