make define the only global; move util methods from namespace to define; change script request.forId to request.parent