RequireJS maybe?