extractor.cpp refactored a bit

I've split extractor.cpp code to methods and organized them in class.
Use an include fence just the other header files for consistency.