Thermal conversion of biomass and biomass components to biofuels and bio-chemicals