Major refactoring on line and token based feature extractor