All of this has been changed in favor of RequireJS.  Although  I still like this idiom and would try to figure out how to do this with RequireJS for dev purposes.