rewrite glob to be more efficient, handle rails submodules and namespacing better