Adding support for requires to the mix.

You'll probably like the clean syntax of require.js, since you're already doing stuff similar to it.  I'm going ahead and cleaning things up to work with this.