Changed resources variable to be a mapping from url to script