Total rewrite, using namespacing, found getChildByName method reducing globals