Refactored the hachoir parser