Clearer switch code in extractor.