complete scanner and extractor, some tests added