Structure inspired by kriskowal's Q. CommonJS, RequireJS and global support.