Biorefining of biomass to liquid fuels and organic chemicals