TECHNOLOGY FOCUS - ORGANIC CHEMISTRY - Preferred Method: The method includes: the step of replacing hydrogen atoms in the structure of the carboxylic compound with atoms of inorganic elements, when the raw material comprises at least a carboxylic compound, which contain hydrogen; and the step of removing inorganic elements from the carboxylic compounds and replace them with other elements, when the raw material comprises at least a carboxylic compound, which contain inorganic elements. The step of washing the raw material is carried out: with aqueous solution that contains organic and/or inorganic salts or acids and where the concentration of the salts and the acids in the aqueous solution is 0.1-30 (preferably 0.1-2) wt/wt.% in water volume; with an aqueous solution that contains organic and/or inorganic salts of aluminum and/or titanium; and in succession in different aqueous solutions. The method includes the thermal pre-treatment of the raw material, where the thermal pre-treatment precedes or follows the washing. The step of removal of inorganic components from raw material is carried out exclusively with washing, where the raw material is not subjected to thermal pretreatment either prior or after washing. The thermal pretreatment of raw material: is realized in nitrogen atmosphere and in the absence of air, at 200-350 degrees C (preferably 250-320 degrees C), for residence time in the temperature from 5 minutes to 2 hours (preferably 5-40 minutes), where the humidity of raw material is smaller than 30% in wet basis; is realized in nitrogen atmosphere and with the presence of oxygen and air, which is limited in less than 40% of the amount that is required for the stoichiometric oxidation of these materials. The step of preparation of the aqueous solution is realized with water of any quality and where washing is carried out at a ratio of raw material over aqueous solution from 33-600 g/l (preferably 150-400 g/l), at a temperature of 13-95 degrees C (preferably 55-80 degrees C), where the washing time is 5 minutes to 24 hours, preferably 10-35 minutes and raw material is stirred in the reactor. Preferred Components: The concentration of the salts in the aqueous solution is 0.1-30 (preferably 0.1-2) wt/wt.% in water volume. The raw material consists of particles, whose size varies from some microns up to 15 cm (preferably smaller than 3 cm). EXAMPLE - Olive kernel wood from an olive kernel oil production plant was prepyrolyzed at 300 degrees C for 1 hour in a lab-scale fixed-bed reactor in nitrogen atmosphere. Subsequently, washing with an aqueous calcium acetate solution 10 wt/wt.% was applied for 1 hour at a solid to liquid ratio 300 g/l using tap water, under constant stirring in a 2l beaker and constant heating at 70 degrees C on a hotplate. After the pretreatment, the sample was filtered and dried at 50 degrees C.