Modified feature extractor to return feature matrix.