Fix bugs in agreements to work without requirejs, and remove amd modules.