Thermochemical processing of biomass