extractor.cpp refactored a bit

I've split extractor.cpp code to methods and organized them in class.
this is a lib include at the wrong position