Neutron scattering study of the YBa2Cu3O6+x system